For many video processing algorithms, like sharpness enhancement, noise reduction or scaling, it is necessary to distinguish between edges and other areas. Usually a gradient operator, for example the Sobel-operator, is applied to distinguish edges from other areas, using a threshold. High gradients indicate edges, low gradients flat areas. Intermediate gradients may indicate a textured area. Typically to improve robustness, the threshold is adaptive to some properties of the image, e.g. contrast or noise level. The result may be post-filtered with a spatial median filter to increase robustness.
However, this approach usually despite the median filter is not very robust. Also, most approaches fail when being applied to edges which are surrounded by textured areas. Other proposals, for example to use a wavelet decomposition or transform the image into the frequency domain by Fourier transformation suffer from being computationally complex.